package com.retail.lottery.colalottery.vo.response;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.relational.core.sql.In;

import java.util.Date;
import java.util.List;

@NoArgsConstructor
@Data
public class GetSetupInfoResponse {
    private String code;
    private String message;
    private Boolean success;
    private Boolean system;
    private LotteryActivityView data;

    @NoArgsConstructor
    @Data
    public static class LotteryActivityView {
        private String setupId;
        private String name;
        private Boolean active;
        private String ruleImage;
        private String activityType;
        private ShareInfoBean shareInfo;
        private CycleInfoBean cycleInfo;
        private NotWinInfoBean notWinInfo;
        private Date from;
        private Date to;
        private String desc;
        private Date createTime;
        private Long now;
        private SubscribeInfoBean subscribeInfo;
        private RuleInfoBean ruleInfo;
        private MemberDaySettingInfoBean memberDaySettingInfo;
        private String id;
        private List<ItemsBean> items;
        private List<TaskInfosBean> taskInfos;

        @NoArgsConstructor
        @Data
        public static class ShareInfoBean {
            private String title;
            private String card;
            private String image;
            private String link;
        }

        @NoArgsConstructor
        @Data
        public static class CycleInfoBean {
            private Integer startWeek;
            private Integer endWeek;
            private String startTime;
            private String endTime;
            private Integer deadlineWeek;
            private String deadlineTime;
            private Integer winningWeek;
            private String winningTime;
            private Integer instantDrawStartWeek;
            private String instantDrawStartTime;
            private Integer instantDrawEndWeek;
            private String instantDrawEndTime;
            private String winningDate;
            private String startDate;
            private String endDate;
            private String instantDrawStartDate;
            private String instantDrawEndDate;
            private String deadlineDate;
        }

        @NoArgsConstructor
        @Data
        public static class NotWinInfoBean {

            private String name;
            private String hint;
            private String image;
            private String link;
        }

        @NoArgsConstructor
        @Data
        public static class SubscribeInfoBean {
            private String remindType;
            private List<String> subscribeList;
            private List<String> nextTurnSubscribeList;
        }

        @NoArgsConstructor
        @Data
        public static class RuleInfoBean {
            private Boolean point;
            private Integer pointQuantity;
            private Boolean needMember;
            private Boolean openTask;
            private Boolean needValidMemberAward;
            private Boolean thirdPartyDefense;
            private Boolean wechatRisk;
            private Integer initCycleAwardTimes;
            private Integer dayAwardTimes;
            private Integer costPointsPerTime;
            private Integer costActivityPointsPerTime;
            private Integer costThirdOrderPointsPerTime;
            private Boolean noCostLotteryTimes;
            private Boolean noCostLotteryTimesWhenFail;
            private String costActivityPointsType;
            private Integer initAwardTimes;
            private Integer limitTimesPerUser;
            private Integer limitTimesPerUserPerDay;
            private Integer limitTimesPerUserPerWeek;
            private Integer limitSuccessTimesPerUser;
            private Boolean syncRecordToThird;
            private Boolean openPool;
            private Boolean timeLog;
            private List<String> limitMembers;
            private List<OuListBean> ouList;
            private List<String> pools;
            private List<PoolSettingListBean> poolSettingList;

            @NoArgsConstructor
            @Data
            public static class OuListBean {
                /**
                 * bg : string
                 * ou : string
                 * ouCode : string
                 * city : string
                 * district : string
                 * default : true
                 */

                private String bg;
                private String ou;
                private String ouCode;
                private String city;
                private String district;
                private Boolean defaultX;
            }

            @NoArgsConstructor
            @Data
            public static class PoolSettingListBean {
                /**
                 * pools : ["string"]
                 * image : string
                 * limitTimesPerUser : 0
                 * dayAwardTimes : 0
                 * noCostLotteryTimes : true
                 * costActivityPointsType : string
                 * costActivityPointsPerTime : 0
                 */

                private String image;
                private int limitTimesPerUser;
                private int dayAwardTimes;
                private boolean noCostLotteryTimes;
                private String costActivityPointsType;
                private Integer costActivityPointsPerTime;
                private List<String> pools;
            }
        }

        @NoArgsConstructor
        @Data
        public static class MemberDaySettingInfoBean {
            private String homePage;
            private String winOrPrize;
            private String activityRule;
            private String prizePool;
            private String winMsg;
            private String winPop;
            private String notWin;
            private String lotteryPop;
            private String retention;
        }

        @NoArgsConstructor
        @Data
        public static class ItemsBean {
            private String goodsId;
            private String prizeType;
            private String prizeTypeDetail;
            private String level;
            private String info;
            private String image;
            private String showImage;
            private String detailImage;
            private String unLockImage;
            private String prizeName;
            private String subTitle;
            private String subInfo;
            private String prizePool;
            private int inventory;
            private int quantity;
            private int sort;
            private int probability;
            private String from;
            private String to;
            private String thirdId;
            private GoodsGrantInfoBean goodsGrantInfo;
            private RuleInfoBeanX ruleInfo;
            private WinnerNoticeInfoBean winnerNoticeInfo;
            private String marketPrice;
            private String id;

            @NoArgsConstructor
            @Data
            public static class GoodsGrantInfoBean {
                /**
                 * grantType : string
                 * desc : string
                 * goodsDesc : string
                 * image : string
                 * images : ["string"]
                 * appId : string
                 * page : string
                 * grantLimitType : string
                 * grantLimitFrom : 2019-08-24T14:15:22Z
                 * grantLimitTo : 2019-08-24T14:15:22Z
                 * grantLimitDaysFrom : 0
                 * grantLimitDaysTo : 0
                 */

                private String grantType;
                private String desc;
                private String goodsDesc;
                private String image;
                private String appId;
                private String page;
                private String grantLimitType;
                private String grantLimitFrom;
                private String grantLimitTo;
                private int grantLimitDaysFrom;
                private int grantLimitDaysTo;
                private List<String> images;
            }

            @NoArgsConstructor
            @Data
            public static class RuleInfoBeanX {
                /**
                 * ouList : [{"bg":"string","ou":"string","ouCode":"string","city":"string","district":"string","probability":0,"limit":0,"default":true}]
                 * limitTimesPerUser : 0
                 * limitTimesPerUserPerDay : 0
                 * limitSuccessTimesPerUser : 0
                 * limitHitTimes : 0
                 * userLimitHitTimes : 0
                 * limitHitTimesPerDay : 0
                 * limitHitTimesPerWeek : 0
                 * hitTimesAddUpByDay : true
                 * firstRound : true
                 * exclusionPrizeList : ["string"]
                 * from : 2019-08-24T14:15:22Z
                 * to : 2019-08-24T14:15:22Z
                 * startLotteryTime : 2019-08-24T14:15:22Z
                 * fitMerchantList : [{"province":"string","merchant":["string"],"sort":0}]
                 * sendChannels : ["string"]
                 * pubToAll : true
                 */

                private int limitTimesPerUser;
                private int limitTimesPerUserPerDay;
                private int limitSuccessTimesPerUser;
                private int limitHitTimes;
                private int userLimitHitTimes;
                private int limitHitTimesPerDay;
                private int limitHitTimesPerWeek;
                private boolean hitTimesAddUpByDay;
                private boolean firstRound;
                private String from;
                private String to;
                private String startLotteryTime;
                private boolean pubToAll;
                private List<OuListBeanX> ouList;
                private List<String> exclusionPrizeList;
                private List<FitMerchantListBean> fitMerchantList;
                private List<String> sendChannels;

                @NoArgsConstructor
                @Data
                public static class OuListBeanX {
                    /**
                     * bg : string
                     * ou : string
                     * ouCode : string
                     * city : string
                     * district : string
                     * probability : 0
                     * limit : 0
                     * default : true
                     */

                    private String bg;
                    private String ou;
                    private String ouCode;
                    private String city;
                    private String district;
                    private int probability;
                    private int limit;
                    private boolean defaultX;
                }

                @NoArgsConstructor
                @Data
                public static class FitMerchantListBean {
                    /**
                     * province : string
                     * merchant : ["string"]
                     * sort : 0
                     */

                    private String province;
                    private int sort;
                    private List<String> merchant;
                }
            }

            @NoArgsConstructor
            @Data
            public static class WinnerNoticeInfoBean {
                /**
                 * startTime : string
                 * time : 0
                 * timeUnit : string
                 */

                private String startTime;
                private int time;
                private String timeUnit;
            }
        }

        @NoArgsConstructor
        @Data
        public static class TaskInfosBean {

            private String id;
            private String code;
            private String taskType;
            private String title;
            private String desc;
            private String intervalType;
            private String lotteryTimeResourceType;
            private String image;
            private String completeImage;
            private String unCompleteImage;
            private Boolean hide;
            private Boolean group;
            private Boolean active;
            private Integer times;
            private Integer num;
            private Integer createTime;
            private Boolean points;
            private List<String> taskCodes;
            private List<String> keys;
            private List<String> prizePools;
        }
    }
}
